package com.ztgf.order.mapper.pay;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.ztgf.order.models.bo.pay.PayOrderLogBO;
import com.ztgf.order.models.dto.pay.PayOrderLogDTO;
import com.ztgf.order.models.vo.pay.PayOrderInfoVO;
import com.ztgf.order.models.vo.pay.PayOrderLogVO;
import com.ztgf.order.models.vo.pay.PayPurchaseOrderVO;
import com.ztgf.order.models.vo.pay.PayShopVO;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * 支付日志表映射
 *
 * @author mxli
 * @Date 2021-06-03 16:12:28
 */
public interface PayOrderLogMapper extends BaseMapper<PayOrderLogDTO> {

    List<PayOrderInfoVO> queryOrderCommodity(@Param("ids") String ids, @Param("shopId") Long shopId);//订单id
    List<PayPurchaseOrderVO> queryPurchaseBargain(@Param("ids") String ids, @Param("shopId") Long shopId);//获取申请砍价服务费
    List<PayOrderInfoVO> queryCommissionMoney(@Param("ids") String ids, @Param("shopId") Long shopId);// 获取佣金
    List<PayOrderInfoVO> queryPurchaseFeeMoneyScalePrice(@Param("ids") String ids, @Param("shopId") Long shopId);//获取砍价成功后手续费
    List<PayShopVO> queryAnnualFee(@Param("ids") String ids);//获取年费
    List<PayShopVO> queryMargin(@Param("ids") String ids);//获取保证金

    List<PayOrderLogVO> queryPagePayOrderLog(Page<PayOrderLogVO> page, PayOrderLogBO bo);//查看保证金使用记录和退还保证金记录

    BigDecimal querySumDeductMarginMoney(@Param("shopId")Long shopId, @Param("type") int type); //扣除保证金总和

    /**
     * 获取待支付的保证金
     * @param shopId
     * @return
     */
    BigDecimal getLogisticsMargin(Long shopId);

    /**
     * 获取待支付的账单金额
     * @param ids
     * @return
     */
    List<PayShopVO> queryLogisticsBill(@Param("ids") String ids, @Param("shopId") Long shopId);
}
